\(\int \frac {(h+i x)^2}{(d e+d f x) (a+b \log (c (e+f x)))} \, dx\) [193]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 32, antiderivative size = 124 \[ \int \frac {(h+i x)^2}{(d e+d f x) (a+b \log (c (e+f x)))} \, dx=\frac {2 e^{-\frac {a}{b}} i (f h-e i) \operatorname {ExpIntegralEi}\left (\frac {a+b \log (c (e+f x))}{b}\right )}{b c d f^3}+\frac {e^{-\frac {2 a}{b}} i^2 \operatorname {ExpIntegralEi}\left (\frac {2 (a+b \log (c (e+f x)))}{b}\right )}{b c^2 d f^3}+\frac {(f h-e i)^2 \log (a+b \log (c (e+f x)))}{b d f^3} \]

[Out]

2*i*(-e*i+f*h)*Ei((a+b*ln(c*(f*x+e)))/b)/b/c/d/exp(a/b)/f^3+i^2*Ei(2*(a+b*ln(c*(f*x+e)))/b)/b/c^2/d/exp(2*a/b)
/f^3+(-e*i+f*h)^2*ln(a+b*ln(c*(f*x+e)))/b/d/f^3

Rubi [A] (verified)

Time = 0.25 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2458, 12, 2395, 2336, 2209, 2339, 29, 2346} \[ \int \frac {(h+i x)^2}{(d e+d f x) (a+b \log (c (e+f x)))} \, dx=\frac {i^2 e^{-\frac {2 a}{b}} \operatorname {ExpIntegralEi}\left (\frac {2 (a+b \log (c (e+f x)))}{b}\right )}{b c^2 d f^3}+\frac {2 i e^{-\frac {a}{b}} (f h-e i) \operatorname {ExpIntegralEi}\left (\frac {a+b \log (c (e+f x))}{b}\right )}{b c d f^3}+\frac {(f h-e i)^2 \log (a+b \log (c (e+f x)))}{b d f^3} \]

[In]

Int[(h + i*x)^2/((d*e + d*f*x)*(a + b*Log[c*(e + f*x)])),x]

[Out]

(2*i*(f*h - e*i)*ExpIntegralEi[(a + b*Log[c*(e + f*x)])/b])/(b*c*d*E^(a/b)*f^3) + (i^2*ExpIntegralEi[(2*(a + b
*Log[c*(e + f*x)]))/b])/(b*c^2*d*E^((2*a)/b)*f^3) + ((f*h - e*i)^2*Log[a + b*Log[c*(e + f*x)]])/(b*d*f^3)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2336

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[1/(n*c^(1/n)), Subst[Int[E^(x/n)*(a + b*x)^p
, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, p}, x] && IntegerQ[1/n]

Rule 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2346

Int[((a_.) + Log[(c_.)*(x_)]*(b_.))^(p_)*(x_)^(m_.), x_Symbol] :> Dist[1/c^(m + 1), Subst[Int[E^((m + 1)*x)*(a
 + b*x)^p, x], x, Log[c*x]], x] /; FreeQ[{a, b, c, p}, x] && IntegerQ[m]

Rule 2395

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rule 2458

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (\frac {f h-e i}{f}+\frac {i x}{f}\right )^2}{d x (a+b \log (c x))} \, dx,x,e+f x\right )}{f} \\ & = \frac {\text {Subst}\left (\int \frac {\left (\frac {f h-e i}{f}+\frac {i x}{f}\right )^2}{x (a+b \log (c x))} \, dx,x,e+f x\right )}{d f} \\ & = \frac {\text {Subst}\left (\int \left (\frac {2 i (f h-e i)}{f^2 (a+b \log (c x))}+\frac {(f h-e i)^2}{f^2 x (a+b \log (c x))}+\frac {i^2 x}{f^2 (a+b \log (c x))}\right ) \, dx,x,e+f x\right )}{d f} \\ & = \frac {i^2 \text {Subst}\left (\int \frac {x}{a+b \log (c x)} \, dx,x,e+f x\right )}{d f^3}+\frac {(2 i (f h-e i)) \text {Subst}\left (\int \frac {1}{a+b \log (c x)} \, dx,x,e+f x\right )}{d f^3}+\frac {(f h-e i)^2 \text {Subst}\left (\int \frac {1}{x (a+b \log (c x))} \, dx,x,e+f x\right )}{d f^3} \\ & = \frac {i^2 \text {Subst}\left (\int \frac {e^{2 x}}{a+b x} \, dx,x,\log (c (e+f x))\right )}{c^2 d f^3}+\frac {(2 i (f h-e i)) \text {Subst}\left (\int \frac {e^x}{a+b x} \, dx,x,\log (c (e+f x))\right )}{c d f^3}+\frac {(f h-e i)^2 \text {Subst}\left (\int \frac {1}{x} \, dx,x,a+b \log (c (e+f x))\right )}{b d f^3} \\ & = \frac {2 e^{-\frac {a}{b}} i (f h-e i) \text {Ei}\left (\frac {a+b \log (c (e+f x))}{b}\right )}{b c d f^3}+\frac {e^{-\frac {2 a}{b}} i^2 \text {Ei}\left (\frac {2 (a+b \log (c (e+f x)))}{b}\right )}{b c^2 d f^3}+\frac {(f h-e i)^2 \log (a+b \log (c (e+f x)))}{b d f^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.24 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.90 \[ \int \frac {(h+i x)^2}{(d e+d f x) (a+b \log (c (e+f x)))} \, dx=\frac {e^{-\frac {2 a}{b}} \left (2 c e^{a/b} i (f h-e i) \operatorname {ExpIntegralEi}\left (\frac {a}{b}+\log (c (e+f x))\right )+i^2 \operatorname {ExpIntegralEi}\left (2 \left (\frac {a}{b}+\log (c (e+f x))\right )\right )+c^2 e^{\frac {2 a}{b}} (f h-e i)^2 \log (a+b \log (c (e+f x)))\right )}{b c^2 d f^3} \]

[In]

Integrate[(h + i*x)^2/((d*e + d*f*x)*(a + b*Log[c*(e + f*x)])),x]

[Out]

(2*c*E^(a/b)*i*(f*h - e*i)*ExpIntegralEi[a/b + Log[c*(e + f*x)]] + i^2*ExpIntegralEi[2*(a/b + Log[c*(e + f*x)]
)] + c^2*E^((2*a)/b)*(f*h - e*i)^2*Log[a + b*Log[c*(e + f*x)]])/(b*c^2*d*E^((2*a)/b)*f^3)

Maple [A] (verified)

Time = 2.12 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.61

method result size
derivativedivides \(\frac {-\frac {i^{2} {\mathrm e}^{-\frac {2 a}{b}} \operatorname {Ei}_{1}\left (-2 \ln \left (c f x +c e \right )-\frac {2 a}{b}\right )}{b}+\frac {c^{2} e^{2} i^{2} \ln \left (a +b \ln \left (c f x +c e \right )\right )}{b}+\frac {c^{2} f^{2} h^{2} \ln \left (a +b \ln \left (c f x +c e \right )\right )}{b}+\frac {2 c e \,i^{2} {\mathrm e}^{-\frac {a}{b}} \operatorname {Ei}_{1}\left (-\ln \left (c f x +c e \right )-\frac {a}{b}\right )}{b}-\frac {2 c f h i \,{\mathrm e}^{-\frac {a}{b}} \operatorname {Ei}_{1}\left (-\ln \left (c f x +c e \right )-\frac {a}{b}\right )}{b}-\frac {2 c^{2} e f h i \ln \left (a +b \ln \left (c f x +c e \right )\right )}{b}}{c^{2} f^{3} d}\) \(200\)
default \(\frac {-\frac {i^{2} {\mathrm e}^{-\frac {2 a}{b}} \operatorname {Ei}_{1}\left (-2 \ln \left (c f x +c e \right )-\frac {2 a}{b}\right )}{b}+\frac {c^{2} e^{2} i^{2} \ln \left (a +b \ln \left (c f x +c e \right )\right )}{b}+\frac {c^{2} f^{2} h^{2} \ln \left (a +b \ln \left (c f x +c e \right )\right )}{b}+\frac {2 c e \,i^{2} {\mathrm e}^{-\frac {a}{b}} \operatorname {Ei}_{1}\left (-\ln \left (c f x +c e \right )-\frac {a}{b}\right )}{b}-\frac {2 c f h i \,{\mathrm e}^{-\frac {a}{b}} \operatorname {Ei}_{1}\left (-\ln \left (c f x +c e \right )-\frac {a}{b}\right )}{b}-\frac {2 c^{2} e f h i \ln \left (a +b \ln \left (c f x +c e \right )\right )}{b}}{c^{2} f^{3} d}\) \(200\)
risch \(\frac {e^{2} i^{2} \ln \left (a +b \ln \left (c f x +c e \right )\right )}{f^{3} d b}-\frac {2 e h i \ln \left (a +b \ln \left (c f x +c e \right )\right )}{f^{2} d b}+\frac {h^{2} \ln \left (a +b \ln \left (c f x +c e \right )\right )}{f d b}+\frac {2 e \,i^{2} {\mathrm e}^{-\frac {a}{b}} \operatorname {Ei}_{1}\left (-\ln \left (c f x +c e \right )-\frac {a}{b}\right )}{c \,f^{3} d b}-\frac {2 h i \,{\mathrm e}^{-\frac {a}{b}} \operatorname {Ei}_{1}\left (-\ln \left (c f x +c e \right )-\frac {a}{b}\right )}{c \,f^{2} d b}-\frac {i^{2} {\mathrm e}^{-\frac {2 a}{b}} \operatorname {Ei}_{1}\left (-2 \ln \left (c f x +c e \right )-\frac {2 a}{b}\right )}{c^{2} f^{3} d b}\) \(219\)

[In]

int((i*x+h)^2/(d*f*x+d*e)/(a+b*ln(c*(f*x+e))),x,method=_RETURNVERBOSE)

[Out]

1/c^2/f^3/d*(-i^2/b*exp(-2*a/b)*Ei(1,-2*ln(c*f*x+c*e)-2*a/b)+c^2*e^2*i^2*ln(a+b*ln(c*f*x+c*e))/b+c^2*f^2*h^2*l
n(a+b*ln(c*f*x+c*e))/b+2*c*e*i^2/b*exp(-a/b)*Ei(1,-ln(c*f*x+c*e)-a/b)-2*c*f*h*i/b*exp(-a/b)*Ei(1,-ln(c*f*x+c*e
)-a/b)-2*c^2*e*f*h*i*ln(a+b*ln(c*f*x+c*e))/b)

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.20 \[ \int \frac {(h+i x)^2}{(d e+d f x) (a+b \log (c (e+f x)))} \, dx=\frac {{\left ({\left (c^{2} f^{2} h^{2} - 2 \, c^{2} e f h i + c^{2} e^{2} i^{2}\right )} e^{\left (\frac {2 \, a}{b}\right )} \log \left (b \log \left (c f x + c e\right ) + a\right ) + i^{2} \operatorname {log\_integral}\left ({\left (c^{2} f^{2} x^{2} + 2 \, c^{2} e f x + c^{2} e^{2}\right )} e^{\left (\frac {2 \, a}{b}\right )}\right ) + 2 \, {\left (c f h i - c e i^{2}\right )} e^{\frac {a}{b}} \operatorname {log\_integral}\left ({\left (c f x + c e\right )} e^{\frac {a}{b}}\right )\right )} e^{\left (-\frac {2 \, a}{b}\right )}}{b c^{2} d f^{3}} \]

[In]

integrate((i*x+h)^2/(d*f*x+d*e)/(a+b*log(c*(f*x+e))),x, algorithm="fricas")

[Out]

((c^2*f^2*h^2 - 2*c^2*e*f*h*i + c^2*e^2*i^2)*e^(2*a/b)*log(b*log(c*f*x + c*e) + a) + i^2*log_integral((c^2*f^2
*x^2 + 2*c^2*e*f*x + c^2*e^2)*e^(2*a/b)) + 2*(c*f*h*i - c*e*i^2)*e^(a/b)*log_integral((c*f*x + c*e)*e^(a/b)))*
e^(-2*a/b)/(b*c^2*d*f^3)

Sympy [F]

\[ \int \frac {(h+i x)^2}{(d e+d f x) (a+b \log (c (e+f x)))} \, dx=\frac {\int \frac {h^{2}}{a e + a f x + b e \log {\left (c e + c f x \right )} + b f x \log {\left (c e + c f x \right )}}\, dx + \int \frac {i^{2} x^{2}}{a e + a f x + b e \log {\left (c e + c f x \right )} + b f x \log {\left (c e + c f x \right )}}\, dx + \int \frac {2 h i x}{a e + a f x + b e \log {\left (c e + c f x \right )} + b f x \log {\left (c e + c f x \right )}}\, dx}{d} \]

[In]

integrate((i*x+h)**2/(d*f*x+d*e)/(a+b*ln(c*(f*x+e))),x)

[Out]

(Integral(h**2/(a*e + a*f*x + b*e*log(c*e + c*f*x) + b*f*x*log(c*e + c*f*x)), x) + Integral(i**2*x**2/(a*e + a
*f*x + b*e*log(c*e + c*f*x) + b*f*x*log(c*e + c*f*x)), x) + Integral(2*h*i*x/(a*e + a*f*x + b*e*log(c*e + c*f*
x) + b*f*x*log(c*e + c*f*x)), x))/d

Maxima [F]

\[ \int \frac {(h+i x)^2}{(d e+d f x) (a+b \log (c (e+f x)))} \, dx=\int { \frac {{\left (i x + h\right )}^{2}}{{\left (d f x + d e\right )} {\left (b \log \left ({\left (f x + e\right )} c\right ) + a\right )}} \,d x } \]

[In]

integrate((i*x+h)^2/(d*f*x+d*e)/(a+b*log(c*(f*x+e))),x, algorithm="maxima")

[Out]

h^2*log((b*log(f*x + e) + b*log(c) + a)/b)/(b*d*f) + integrate((i^2*x^2 + 2*h*i*x)/(b*d*e*log(c) + a*d*e + (b*
d*f*log(c) + a*d*f)*x + (b*d*f*x + b*d*e)*log(f*x + e)), x)

Giac [F]

\[ \int \frac {(h+i x)^2}{(d e+d f x) (a+b \log (c (e+f x)))} \, dx=\int { \frac {{\left (i x + h\right )}^{2}}{{\left (d f x + d e\right )} {\left (b \log \left ({\left (f x + e\right )} c\right ) + a\right )}} \,d x } \]

[In]

integrate((i*x+h)^2/(d*f*x+d*e)/(a+b*log(c*(f*x+e))),x, algorithm="giac")

[Out]

integrate((i*x + h)^2/((d*f*x + d*e)*(b*log((f*x + e)*c) + a)), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {(h+i x)^2}{(d e+d f x) (a+b \log (c (e+f x)))} \, dx=\int \frac {{\left (h+i\,x\right )}^2}{\left (d\,e+d\,f\,x\right )\,\left (a+b\,\ln \left (c\,\left (e+f\,x\right )\right )\right )} \,d x \]

[In]

int((h + i*x)^2/((d*e + d*f*x)*(a + b*log(c*(e + f*x)))),x)

[Out]

int((h + i*x)^2/((d*e + d*f*x)*(a + b*log(c*(e + f*x)))), x)